import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const OPERATOR: AppRouteRecordRaw = {
  path: '/operators',
  name: 'OperatorApp',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.operators',
    requiresAuth: true,
    icon: 'icon-calendar',
    order: 400,
  },
  children: [
    {
      path: 'list',
      name: 'OperatorListApp',
      component: () => import('@/views/operators/list/index.vue'),
      meta: {
        locale: 'menu.operators.list',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'invite',
      name: 'OperatorInviteApp',
      component: () => import('@/views/operators/invite/index.vue'),
      meta: {
        locale: 'menu.operators.invite',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'invite-detail',
      name: 'OperatorInviteDetailApp',
      component: () => import('@/views/operators/invite/detail.vue'),
      meta: {
        locale: 'menu.operators.invite-detail',
        requiresAuth: true,
        hideInMenu: true,
        roles: ['*'],
      },
    },
    {
      path: 'detail',
      name: 'OperatorDetailApp',
      component: () => import('@/views/operators/detail/index.vue'),
      meta: {
        locale: 'menu.operators.detail',
        requiresAuth: true,
        hideInMenu: true,
        roles: ['*'],
      },
    },
  ],
};

export default OPERATOR;
